<?

/* 
 * View implementation for the CharacterView controller
 */ 
 
$increasable = $this->character->increasableAttributes;

#include('custom/charactertabs.php');

$temp = $this->viewCharacter->charDS['c_name'];
$firstname = CutSegment(' ', $temp);

$userDS = DB_GetDataset('users', $this->viewCharacter->charDS['c_ref_user'])

?>
<h3><?= $firstname ?>'s Stats</h3>
<img width="64" src="<?= $userDS['u_fb_pic_square'] ?>" style="float:right;"/>
<?
  include('custom/character.index.statblock.php');
?>
<br/>
<table width="100%" cellpadding="0" cellspacing="0"><tr>
  <td valign="top" width="60%">
    <h3><?= $firstname ?>'s Stuff</h3>
    <div style="padding: 4px;"><?
      $this->viewCharacter->getInventory();
      foreach($this->viewCharacter->invList as $inv)
      {
        $txt = $inv['iv_quantity'].'x '.$inv['i_name'];
        if ($inv['iv_on'] == 'Y') $txt = '<b>'.$txt.'</b>';
        $list[] = $txt;
      }
      print(@implode(', ', $list));
    ?><br/><br/>
      <a class="linkbutton"
        href="http://www.facebook.com/profile.php?id=<?= $userDS['u_fb_uid'] ?>" target="_top">visit <?= $firstname ?>'s Facebook profile</a>
    </div>
  </td>
  <td>
    &nbsp;&nbsp;&nbsp;
  </td>
  <td valign="top" width="*">
    <?
      #include('custom/character.index.spells.php');
    ?>
  </td>
</tr></table>